﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Itau.SC.EnterpriseLib.Logging;
using Itau.SC.EnterpriseLib.Logging.ExtraInformation;
using Itau.SC.EnterpriseLib.Logging.Filters;

namespace EnterpriseLibraryWrapper
{
    public class LoggerWrapper : ILoggerWrapper
    {
        public void Write(int priority, string appDomainName, string title, string message)
        {
            try
            {
                LogEntry logEntry = new LogEntry();
                logEntry.Priority = priority;
                logEntry.AppDomainName = appDomainName;
                logEntry.Title = title;
                logEntry.Message = message;
                logEntry.Categories.Add("CatAplicOnline");
                Logger.Write(logEntry);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
    }
}
